package com.sec.etech.employeesync.sapquery.factory;

import com.sec.etech.employeesync.sapquery.strategy.AccountQueryStrategy;
import com.sec.etech.employeesync.sapquery.strategy.CompanyQueryStrategy;
import com.sec.etech.employeesync.sapquery.strategy.QueryStrategy;
import org.openbpm.base.api.exception.BusinessException;

public class QueryStrategyFactory {
    public static QueryStrategy getStrategy(String option) {
        if ("company".equals(option)) {
            return new CompanyQueryStrategy();
        } else if ("account".equals(option)) {
            return new AccountQueryStrategy();
        }
        throw new BusinessException("不支持的查询，请联系管理员: " + option);
    }
}
